{extend name="common/application" /}
{block name="title"}
<title>人才培训-更多课程</title>
{/block}
{block name="css"}
<link rel="stylesheet" type="text/css" href="_CSS_/train.css"/>
{/block}


{block name="navbar"}{include file="/common/navbar" /}{/block}
{block name="content"}

			<!-- 主体内容 -->
			<div class="main">
				<div class="mainBody normalBox clearfix" style="padding-top: 0px;">
					<!--面包屑导航-->
					<div class="breadcrumb">
						<p>当前位置：
							<a href="index.html">人才培训</a> &gt;
							<a class="curPage" href="javascript:;">培训·课程</a>
						</p>
					</div>
					<!--培训课程-->
					<div class="courses sectionArea normalBox" style="margin-top: 0px;">
						<!--课程分类-->
						<div class="courseMenu">
							<div class="courseType">
								<ul>
									<li>
										<a class="courseTypeItem active" href="javascript:;">
											<span class="icons icon-allcourse hide"></span>
											<span class="icons icon-allcourse-active"></span>全部课程
										</a>
									</li>
									<li>
										<a class="courseTypeItem" href="javascript:;">
											<span class="icons icon-appraise"></span>
											<span class="icons icon-appraise-active hide"></span>专利评议
										</a>
									</li>
									<li>
										<a class="courseTypeItem" href="javascript:;">
											<span class="icons icon-safeguard"></span>
											<span class="icons icon-safeguard-active hide"></span>专利维权
										</a>
									</li>
									<li>
										<a class="courseTypeItem" href="javascript:;">
											<span class="icons icon-deposit"></span>
											<span class="icons icon-deposit-active hide"></span>专利托管
										</a>
									</li>
									<li>
										<a class="courseTypeItem" href="javascript:;">
											<span class="icons icon-agent"></span>
											<span class="icons icon-agent-active hide"></span>专利代理
										</a>
									</li>
									<li>
										<a class="courseTypeItem" href="javascript:;">
											<span class="icons icon-applicance"></span>
											<span class="icons icon-applicance-active hide"></span>政策应用
										</a>
									</li>
									<li>
										<a class="courseTypeItem" href="javascript:;">
											<span class="icons icon-develop"></span>
											<span class="icons icon-develop-active hide"></span>设计开发
										</a>
									</li>
									<li class="mr0">
										<a class="courseTypeItem" href="javascript:;">
											<span class="icons icon-more"></span>
											<span class="icons icon-more-active hide"></span>其他
										</a>
									</li>
								</ul>
							</div>
							<div class="courseSelect normalBox">
								<ul>
									<li class="selected">
										<a class="selectType" href="javascript:;">综合</a>
									</li>
									<li>
										<a class="selectType" href="javascript:;">最新</a>
									</li>
									<li>
										<a class="selectType" href="javascript:;">最热</a>
									</li>
								</ul>
							</div>
						</div>
						<div class="conBody" style="min-height: 500px;">
							<!--查询不出数据-->
							<div class="nodatas normalBox">
								<img src="_IMG_/nodata.png"/>
								<p>抱歉，找不到相关数据</p>
							</div>




						</div>
						<!--分页-->
						<div id="page"></div>
						<!--<div class="pagination" id="pagination">-->
							<!--<a href="javascript:;" class="page-prev">-->
								<!--<span class="icons icon-backward"></span>-->
							<!--</a>-->
							<!--<a href="javascript:;" class="current">1</a>-->
							<!--<a href="javascript:;">2</a>-->
							<!--<a href="javascript:;">3</a>-->
							<!--<a href="javascript:;">4</a>-->
							<!--<a href="javascript:;">5</a>-->
							<!--<a href="javascript:;" class="more" style="background:#f3f3f3 !important;">...</a>-->
							<!--<a href="javascript:;">13</a>-->
							<!--<a href="javascript:;" class="page-next">-->
								<!--<span class="icons icon-forward"></span>-->
							<!--</a>-->
						<!--</div>-->
					</div>
				</div>
			</div>
{/block}

{block name="js"}


	<script type="text/javascript">
		$(function(){
			video_list(1);
		});
		$(".courseType ul li").on('click',function () {
			$(".courseType ul li").children('.active').find("span:eq(0)").removeClass('hide');
			$(".courseType ul li").children('.active').find("span:eq(1)").addClass('hide');
			var index = $(".courseType ul li").index(this);
			$(".courseType ul li").find('a').removeClass('active');
			$(this).find('a').addClass('active');
			$(this).children('.active').find("span:eq(0)").addClass('hide');
			$(this).children('.active').find("span:eq(1)").removeClass('hide');
			var order =$(".courseSelect ul li").index($(".courseSelect ul li[class='selected']"));
			video_list(1,index,order);
		});
		$(".courseSelect ul li").on('click',function () {
			var index = $(".courseType ul li").index($(".courseType ul li").find("a[class='courseTypeItem active']").parent());
			var order =$(".courseSelect ul li").index(this);
			$(".courseSelect ul li").removeClass('selected');
			$(this).addClass('selected');
			video_list(1,index,order);
		});

  
		function video_list(page,type,order){
			$.ajax({
				type: "get",
				url: "/index.php/api/video/course_list",
				data:{'number':20,'page':page,'type':type,'order':order},
				dataType: 'jsonp',
				success: function (msg) {
					var html='';
					if(msg.code == 200) {
						if(msg.data.data.length>0){
							for(var i=0;i<msg.data.data.length;i++){
								if(i==3||i==7||i==11||i==15||i==19){
									html+='<div class="sectionItem mr0">';
								}else{
									html+='<div class="sectionItem">';
								}
								html+='<div class="imgBox">';
								html+='<a class="links" href="courses_details.html?id='+msg.data.data[i].id+'">';
								html+='<img  src="/Images/Cover/'+msg.data.data[i].pic+'"/></a></div>';
								html+='<div class="courseCon">';
								html+='<a class="links courseTitle text_overflow" href="courses_details.html?id='+msg.data.data[i].id+'">'+msg.data.data[i].title+'</a>';
								html+='<p class="Episodes">共<span class="EpisodesNum">'+msg.data.data[i].episode+'</span>集</p>';
								html+='<p class="learner"><span class="learnerNum">'+msg.data.data[i].views+'</span>人学习</p>';
								html+='<p class="praise"><span class="icons icon-praise"></span>'+msg.data.data[i].likes+'</p></div></div>';
							}
						}else{
							html+='<div class="nodatas normalBox"><img src="/static/web/images/nodata.png"/><p>抱歉，找不到相关数据</p></div>';
						}
						$(".conBody").eq(0).html(html);
						$('#page').html(msg.data.render);
						$("#pagination").delegate("a","click",function(){
							var num= $(this).attr("num");
							if(num){
								video_list(num,type,order);
							}
						});
					}
					if(msg.code == 1000) {
						html+='<div class="nodatas normalBox"><img src="/static/web/images/nodata.png"/><p>抱歉，找不到相关数据</p></div>';
						$(".conBody").eq(0).html(html);
					}
				}
			});
		}
	</script>
{/block}